<?php

use yii\helpers\Html;
use yii\widgets\DetailView;

/* @var $this yii\web\View */
/* @var $model common\models\User */

$this->title = $model->username;
$this->params['breadcrumbs'][] = ['label' => 'Users', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="user-view">

    <h1><?= $model->username.'的信息' ?></h1>

    <p>
        <?= Html::a('重设密码', ['reset', 'id' => $model->id], ['class' => 'btn btn-warning']) ?>
        <?= Html::a('更新', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
        <?=
        Html::a('删除', ['delete', 'id' => $model->id], [
            'class' => 'btn btn-danger',
            'data' => [
                'confirm' => '确认删除此项吗?',
                'method' => 'post',
            ],
        ])
        ?>
    </p>

    <?=
    DetailView::widget([
        'model' => $model,
        'attributes' => [
//            'id',
            'username',
//            'auth_key',
//            'password_hash',
//            'password_reset_token',
            'email:email',
//            'status',
            [
                "attribute" => "created_at",
                "format" => ["date", "php:Y-m-d H:i:s"],
            ],
            [
                "attribute" => 'updated_at',
                "format" => ["date", "php:Y-m-d H:i:s"],
            ],
        ],
    ])
    ?>

</div>
